﻿package mortal.game.net.command.pack
{
    import Framework.MQ.*;
    import Message.Public.*;
    import mortal.game.cache.packCache.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.game.view.lotteryDraw.*;
    import mortal.mvc.core.*;

    public class PackInfoCommand extends BroadCastCall
    {

        public function PackInfoCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            var _loc_2:* = param1.messageBase as SBag;
            switch(_loc_2.posType)
            {
                case EPlayerItemPosType._EPlayerItemPosTypeBag:
                {
                    _cache.pack.backPackCache.sbag = _loc_2;
                    NetDispatcher.dispatchCmd(ServerCommand.BackpackAllDataGet, null);
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosTypeRole:
                {
                    _cache.pack.packRolePackCache.sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosTypeMount:
                {
                    (_cache.pack.mountPackCache as PackPosTypeCache).sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosTypeWarehouse:
                {
                    (_cache.pack.warehouseCache as PackPosTypeCache).sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosTypeWardrobe:
                {
                    (_cache.pack.wardrobePackCache as WardrobePackCache).sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosTypeDefenseCopyBag:
                {
                    _cache.pack.defenseBag.sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosTypeDefenseCopyRole:
                {
                    _cache.pack.defenseRoleEquipCache.sbag = _loc_2;
                    NetDispatcher.dispatchCmd(ServerCommand.DefenseCopyBagInit, null);
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosTypeDecompose:
                {
                    _cache.pack.decomposePackCache.sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosGodHead:
                {
                    (_cache.pack.halidomBag as HalidomPackCache).sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosLottery:
                {
                    (_cache.pack.lotteryDrawBag as lotteryDrawPackageCache).sbag = _loc_2;
                    break;
                }
                case EPlayerItemPosType._EPlayerItemPosRune:
                {
                    (_cache.pack.runeBag as PackPosTypeCache).sbag = _loc_2;
                    break;
                }
                default:
                {
                    if (_cache.pack.getPackChacheByPosType(_loc_2.posType))
                    {
                        _cache.pack.getPackChacheByPosType(_loc_2.posType).sbag = _loc_2;
                    }
                    break;
                    break;
                }
            }
            return;
        }// end function

    }
}
